//
//  UIWebView+ClearBackground.m
//  Lvmm
//
//  Created by zhouyi on 13-5-10.
//  Copyright (c) 2013年 Lvmama. All rights reserved.
//

@implementation UIWebView (ClearBackground)

// 去掉UIWebView上下滚动出边界时的黑色阴影
- (void)clearWebViewBackgroundWithColor{
    for (UIView *view in [self subviews]){
        if ([view isKindOfClass:[UIScrollView class]]){
            for (UIView *shadowView in view.subviews){
                // 上下滚动出边界时的黑色的图片 也就是拖拽后的上下阴影
                if ([shadowView isKindOfClass:[UIImageView class]]){
                    shadowView.hidden = YES;
                }
            }
        }
    }
}

- (void)drawRect:(CGRect)rect {
    [super drawRect:rect];
    [self clearWebViewBackgroundWithColor];
}

@end
